package com.pmcc.core.entity.constraints;

import javax.validation.Constraint;
import javax.validation.Payload;
import javax.validation.constraints.Pattern;
import java.lang.annotation.*;

/**
 * Created by syk on 17/6/23.
 */
@Pattern(regexp =  "[1][0-9]{10}", message = "{common.mobileNumber.Pattern}")
@Constraint(validatedBy = {})
//@NotNull(message="{common.mobileNumber.NotNull}")
@Target({ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface MobileNumber {
    String message() default "{common.mobileNumber.Pattern}";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};

}
